﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcBlog.ViewModels.UserManagerViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Benutzer "<%: Model.User.Username %>" bearbeiten</h2>

    <% using (Html.BeginForm()) {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            

            <%: Html.HiddenFor( model => model.User.User_ID) %>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.User.Firstname)%>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.User.Firstname)%>
                <%: Html.ValidationMessageFor(model => model.User.Firstname)%>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.User.Lastname)%>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.User.Lastname)%>
                <%: Html.ValidationMessageFor(model => model.User.Lastname)%>
            </div>

                 <div class="editor-label">
                <%: Html.LabelFor(model => model.User.Email)%>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.User.Email)%>
                <%: Html.ValidationMessageFor(model => model.User.Email)%>
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.User.Username)%>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.User.Username, new  { @readonly = "readonly", @class = "readonly" } )%>
                <%: Html.ValidationMessageFor(model => model.User.Username)%>
            </div>

             <div class="editor-label">
                <%: Html.LabelFor(model => model.User.Password)%>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.User.Password)%>
                <%: Html.ValidationMessageFor(model => model.User.Password)%>
            </div>

            <p>
                <input type="submit" value="Speichern" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Back to List", "Index") %>
    </div>

</asp:Content>

